﻿CREATE TABLE [dbo].[Products] (
    [ID]          INT           IDENTITY (1, 1) NOT NULL,
    [ProductNo]   VARCHAR (20)  NULL,
    [Module]      NVARCHAR (50) NULL,
    [Color]       VARCHAR (10)  NULL,
    [Adapter]     VARCHAR (50)  NULL,
    [Description] VARCHAR (100) NULL,
    [SortIndex]   INT           CONSTRAINT [DF_products_SortIndex] DEFAULT ((0)) NOT NULL,
    [Status]      INT           CONSTRAINT [DF_products_Status] DEFAULT ((1)) NOT NULL,
    [PType]       TINYINT       CONSTRAINT [DF_Products_PType] DEFAULT ((1)) NOT NULL,
    CONSTRAINT [PK_products] PRIMARY KEY CLUSTERED ([ID] ASC)
);










GO
CREATE UNIQUE NONCLUSTERED INDEX [OneName]
    ON [dbo].[Products]([Module] ASC);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'状态', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Products', @level2type = N'COLUMN', @level2name = N'Status';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'排序号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Products', @level2type = N'COLUMN', @level2name = N'SortIndex';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'产品编号（零件号）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Products', @level2type = N'COLUMN', @level2name = N'ProductNo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'产品类型 1、塑料件 2、金属件', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Products', @level2type = N'COLUMN', @level2name = N'PType';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'产品型号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Products', @level2type = N'COLUMN', @level2name = N'Module';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'备注', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Products', @level2type = N'COLUMN', @level2name = N'Description';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'颜色', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Products', @level2type = N'COLUMN', @level2name = N'Color';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'适配范围', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Products', @level2type = N'COLUMN', @level2name = N'Adapter';

